package com.whmw.mybatisplusdemo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.whmw.mybatisplusdemo.pojo.User;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.mapping.ResultSetType;
import org.apache.ibatis.session.ResultHandler;

/**
 * @author 陈秋雨
 * @since 2025/07/12 下午 11:26
 */
public interface UserMapper extends BaseMapper<User> {
    @Select("SELECT * FROM user")
    @Options(resultSetType = ResultSetType.FORWARD_ONLY)
    @ResultType(User.class)
    void selectStream(ResultHandler<User> handler);
}